package com.demo.service.impl;

import com.demo.dao.ChuhuDAO;
import com.demo.dao.impl.ChuhuDAOImpl;
import com.demo.service.ChuhuService;
import com.demo.vo.Chuhu;

import java.io.Serializable;
import java.util.Map;

/**
 * 储户模块的Service层（业务层）的具体实现类，对ChuhuService接口中定义的抽象方法作出具体的功能实现
 */
public class ChuhuServiceImpl implements ChuhuService {
    //@Override
    public void add(Chuhu vo) {
        ChuhuDAO chuhuDAO = new ChuhuDAOImpl();
        chuhuDAO.add(vo);
    }

    //@Override
    public void delete(long id) {
        ChuhuDAO chuhuDAO = new ChuhuDAOImpl();
        chuhuDAO.delete(id);
    }

    //@Override
    public void update(Chuhu vo) {
        ChuhuDAO chuhuDAO = new ChuhuDAOImpl();
        chuhuDAO.update(vo);
    }

    //@Override
    public Chuhu get(Serializable id) {
        ChuhuDAO chuhuDAO = new ChuhuDAOImpl();
        return chuhuDAO.get(id);
    }

    //@Override
    public Map<String, Object> list(Map<String, Object> params) {
        ChuhuDAO chuhuDAO = new ChuhuDAOImpl();
        return chuhuDAO.list(params);
    }
}
